//
//  Left_cell.m
//  Stock_List
//
//  Created by Canny on 2017/5/29.
//  Copyright © 2017年 HZJK. All rights reserved.
//

#import "Left_cell.h"
#import "Stock.h"
#import "Masonry.h"
@interface Left_cell ()
@property (nonatomic,strong)UILabel * lab_up;
@property (nonatomic,strong)UILabel * lab_down;
@property (nonatomic,strong)UIView  * view_Line;
@end

@implementation Left_cell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self){
        self.backgroundColor = [UIColor whiteColor];
        [self initView];
    }
    return self;
}

- (void)initView{
    _lab_up=[[UILabel alloc]init];
    _lab_up.textAlignment=NSTextAlignmentCenter;
    _lab_up.font=[UIFont systemFontOfSize:13.0];
    [self addSubview:_lab_up];

    [_lab_up mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.and.right.and.top.equalTo(self);
        make.height.mas_equalTo(20);

    }];
    
    _lab_down=[[UILabel alloc]init];
    _lab_down.textAlignment=NSTextAlignmentCenter;
    _lab_down.font=[UIFont systemFontOfSize:10.0];
    [self addSubview:_lab_down];
    [_lab_down mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.and.right.and.bottom.equalTo(self);
        make.height.mas_equalTo(20);
        
    }];
    
    _view_Line=[[UIView alloc]init];
    _view_Line.backgroundColor=[UIColor grayColor];
    _view_Line.alpha=0.6;
    [self addSubview:_view_Line];
    [_view_Line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.and.right.and.bottom.equalTo(self);
        make.height.mas_equalTo(0.6);
        
    }];
    

}
-(void)relayOutWithModel:( Stock *)model{
    _lab_up.text=model.title;
    _lab_down.text=model.number;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
